<?php get_header();?>
<!-- Trang nha hang -->
<body>
<div id="wrapper">
	<?php require_once TEMPLATEPATH.'/views/view-header.php';?>
    <?php require_once TEMPLATEPATH.'/views/view-menu.php';?>
    <div id="header-third">
    		<!--slideshow-->
 		   	<?php require_once TEMPLATEPATH.'/views/view-slide-show.php';?>
		    <!--end slideshow--> 
            <!--container-->
         <div id="container">
         <?php require_once TEMPLATEPATH.'/views/view-breadcrumb.php';?>
         <div class="clear"></div>
         <!--main content-->
            <div id="maincontent">
            	
            	
            	<div id="page-index" class="page-danh-sach-dich-vu-05">   
            	<?php 
				$args = null;
				$num_post		= -1;
				$post_type		= 'services'; 
				$orderby		= 'date';
				$order			= 'DESC';
				$meta_key		= $wpdb->prefix.'display';
				$meta_value		= 'display';
				$args = db_query_all_post_in_post_type($num_post, $post_type, $orderby, $order, $meta_key, $meta_value);					
				$query = new WP_Query($args);
				?>
            	   <div class="gioithieu">                    
	                    <h3>Services</h3>    
                    	<div id="box-content">     
                       <ul class="danh-sach-05">
                       	<?php                     
		                    if($query->have_posts())
		                    {
		                    	while ($query->have_posts())
		                    	{
		                    		$query->the_post();
		                    		$post_id = get_the_ID();
		                    		$title = get_the_title($post_id);
		                    		$perlink = get_permalink($post_id);
		                    		$thumbnail = db_get_post_meta($post_id, $wpdb->prefix.'thumbnail');
		                    		$alt = db_get_alt_attachment_id($post_id, $wpdb->prefix.'thumbnail');
		                    		$excerpt = db_shortDesc(get_the_content(), 200);
		                    		if(!$alt)
		                    			$alt = db_vietnamese_slug($title);
		                    		?>
		                    		<li>
				                    	<div class="bgdanhsachtour">
				                        	<a href="<?php echo $perlink;?>">
				                        	<img alt="<?php echo $alt;?>" src="<?php echo $thumbnail;?>"></a>
				                        </div>   
				                        <p class="tieu-de-service"><a href="<?php echo $perlink;?>"><?php echo $title;?></a></p>         
				                        <p>
				                        <?php echo $excerpt;?>
				                        </p>          
				                    </li>
		                    		<?php 	
		                    	}
		                    	wp_reset_query();
		                    }
		                    else 
		                    {
		                    	echo 'No found!';
		                    }
		                    ?>  		                	
			                   		
			                </ul>
               			 </div>                	
                    </div>
                    
                    <!--  Gallery -->
                    <?php require_once TEMPLATEPATH.'/views/view-gallery.php';?>
                    
                </div>
                
                
            </div>
            <!--main content-->
            <!--sidebar-right-->
            <?php get_sidebar();?> 
            <!--sidebar-right-->
            <div class="clear"></div> 
        </div>
        <!--container-->
        <!--bgfooter-->
<?php get_footer();?>
          